#include <stdio.h>
#include <mysql.h>

#define def_host_name	"localhost"
#define def_user_name	"guto"
#define def_password	NULL	
#define def_db_name	"supplier"

int main(int argc, char* argv[]){
	MYSQL*	conn;

	conn = mysql_init (NULL);
	if (conn == NULL){
		fprintf (stderr, "mysql_init() has failed.\n");
		return 1;
	}
	if (mysql_real_connect (
			conn,
			def_host_name,
			def_user_name,
			def_password,
			def_db_name,
			0,
			NULL,
			0)
			== NULL){
		fprintf (stderr, "mysql_real_connect() has failed:\n Error %u (%s)\n", mysql_errno (conn), mysql_error (conn));
		return 1;
	}
	mysql_close (conn);
	return 0;
}
